<script lang="ts"></script>

<template>
  <div class="card">
    <div class="header">
      <span class="title">并且推一且舞呼呼冷嘎好...</span>
      <span class="subtitle">nostrud cupidatat ut fugiat est</span>
    </div>
    <div class="content">
      <img src="https://via.placeholder.com/80" alt="猫咪图片" class="image" />
      <p class="description">aliquip aliqua magna officia</p>
    </div>
  </div>
</template>

<script lang="ts" setup></script>

<style>
.card {
  width: 300px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.title {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px; /* 控制标题最大宽度，避免文字过长 */
}

.subtitle {
  font-size: 12px;
  color: #999;
}

.content {
  display: flex;
  align-items: center;
}

.image {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  object-fit: cover; /* 保持图片比例 */
  margin-right: 10px;
}

.description {
  font-size: 14px;
  color: #666;
  flex: 1; /* 让描述文本占满剩余空间 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>
